<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    // 应用的名字
	'name'=>'有货拍拍旗舰店后台',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	),

	// application components
	//使用的语言，影响L10N
	'language'=>'zh_cn',
	//如果配置了theme，那view就会到theme下面去找，找不到才到view目录下面找
	//'theme'=>'classic',
	'components'=>array(
	    // L10N的文件夹
	    'coreMessages'=>array(
	        'basePath'=>'protected/messages',
	    ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				    // 如果需要修改log level和需要记录的类别，则使用以下的配置
				    // log被记录在runtime文件夹下
				    //'levels'=>'trace, info, error, warning',
                    //'categories'=>'system.db.*',
				),
			),
		),
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),
		// 数据库配置，使用utf8编码，正式环境上需要配置这里的链接
		'db'=>array(
            'class'=>'CDbConnection',
            'connectionString'=>'mysql:host=localhost;dbname=paipai',
		    'charset'=>'utf8',
            'username'=>'root',
            'password'=>'yoho@pp@cn',
        ),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	    // 拍拍api用到的配置信息
		'paipaiApi'=>array(
	        // 配置每一个拍拍接口对应的url地址。
	        'url'=>array(
	            'addprivate'=>'http://rest.paipai.com/brand_spu/addprivate',
	            'getprivate'=>'http://rest.paipai.com/brand_spu/getprivate',
	            'modifyprivate'=>'http://rest.paipai.com/brand_spu/modifyprivate',
	            'additem'=>'http://rest.paipai.com/brand_item/add',
	            'getitem'=>'http://rest.paipai.com/brand_item/get',
	            'modifyitem'=>'http://rest.paipai.com/brand_item/modify',
	            'modifystock'=>'http://rest.paipai.com/brand_item/modifystock',
	            'modifyaccessory'=>'http://rest.paipai.com/brand_item/modifyaccessory',
	            'addprivateitem'=>'http://rest.paipai.com/brand_item/addprivate',
		        'searchdeal'=>'http://rest.paipai.com/brand_deal/search',
		        'getdeal'=>'http://rest.paipai.com/brand_deal/get',
		        'modifydealstate'=>'http://rest.paipai.com/brand_deal/modifystate',
	        ),
		    'head'=>array(
		        'spid'=>'29230000e903473d934a48abd13ef7c2',
		        'userip'=>'201.154.23.233',
		        'uin'=>'611968835',
		        'token'=>'43e779240f27ce3d934a5b2363f88686',
		    ),
		    'seckey'=>'58349ofksu37ujgkg78jdk540p7lwu34',
		),
	),
	
);